home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
pas_all.zip
/
TI425.ASC
< prev
next >
Wrap
Text File
|
1992-08-12
|
2KB
|
133 lines
PRODUCT : TURBO PASCAL GRAPHIX TOOLBOX NUMBER : 425
VERSION : 4.0
OS : PC-DOS
DATE : APRIL 5, 1988 PAGE : 1/1
TITLE : MODIFYING HERCPRESENT IN GRAPHIX TOOLBOX 4.0
Turbo Pascal stores function results in a special area. In the
case of a Boolean function result, it is stored in BP-0001. The
exit code of a function then moves the value stored there to AL.
The code presented in function HercPresent computes the proper
value for the function result, but never places it into BP-0001,
and just keeps the value in AL. On some machines, this can cause
a range check error on assignment of the function result. The
The old inline statement of the Function HercPresent was as
follows:
$26/$88/$0E/$FF/$3F/ { MOV ES:[3FFFH],CL
}
$C3/ { RET
}
$30/$C0); { L4: XOR AL,AL
}
{ L7:
}
end; { HercPresent }
Adding the three inline commands ( /$88/$46/$FF ) before the end
of the inline statement places the value in AL into the area
where Turbo will look for the function result.
The new code should look as follows:
$26/$88/$0E/$FF/$3F/ { MOV ES:[3FFFH],CL
}
$C3/ { RET
}
$30/$C0/ { L4: XOR AL,AL
}
$88/$46/$FF); { L7: MOV [BP-0001],AL
}
end; { HercPresent }
DISCLAIMER: You have the right to use this technical
information subject to the terms of the No-Nonsense License
PRODUCT : TURBO PASCAL GRAPHIX TOOLBOX NUMBER : 425
VERSION : 4.0
OS : PC-DOS
DATE : APRIL 5, 1988 PAGE : 2/1
TITLE : MODIFYING HERCPRESENT IN GRAPHIX TOOLBOX 4.0
Statement that you received with the Borland product to which
this information pertains.